package realQuestion.youdeke;

public class Main1 {

    public int calculate (String s) {
        // write code here
        char[] arr = s.toCharArray();
        if (arr.length==2){
            if (arr[0]=='-'){
                System.out.println(-(arr[1]-'0'));
                return -(arr[1]-'0');
            }else {
                System.out.println((arr[1]-'0'));
                return (arr[1]-'0');
            }

        }
        int a=  (arr[0]-'0');
        char fuhao=arr[1];
        int b=arr[2]-'0';
        if ((fuhao=='-')){
            System.out.println(a-b);
            return  a-b;
        }else {
            System.out.println(a+b);
            return  a+b;
        }


    }

}
